Integrand size = 21, antiderivative size = 116 \[ \int \cot (c+d x) \sqrt {a+b \tan (c+d x)} \, dx=-\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {\sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {\sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d} \]
[Out]
Time = 0.37 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps used = 11, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3653, 3620, 3618, 65, 214, 3715} \[ \int \cot (c+d x) \sqrt {a+b \tan (c+d x)} \, dx=-\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {\sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {\sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d} \]
[In]
[Out]
Rule 65
Rule 214
Rule 3618
Rule 3620
Rule 3653
Rule 3715
Rubi steps \begin{align*} \text {integral}& = a \int \frac {\cot (c+d x) \left (1+\tan ^2(c+d x)\right )}{\sqrt {a+b \tan (c+d x)}} \, dx+\int \frac {b-a \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx \\ & = \frac {1}{2} (-i a+b) \int \frac {1-i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx+\frac {1}{2} (i a+b) \int \frac {1+i \tan (c+d x)}{\sqrt {a+b \tan (c+d x)}} \, dx+\frac {a \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\tan (c+d x)\right )}{d} \\ & = -\frac {(a-i b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a-i b x}} \, dx,x,i \tan (c+d x)\right )}{2 d}-\frac {(a+i b) \text {Subst}\left (\int \frac {1}{(-1+x) \sqrt {a+i b x}} \, dx,x,-i \tan (c+d x)\right )}{2 d}+\frac {(2 a) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d} \\ & = -\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {(i a-b) \text {Subst}\left (\int \frac {1}{-1+\frac {i a}{b}-\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d}-\frac {(i a+b) \text {Subst}\left (\int \frac {1}{-1-\frac {i a}{b}+\frac {i x^2}{b}} \, dx,x,\sqrt {a+b \tan (c+d x)}\right )}{b d} \\ & = -\frac {2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )}{d}+\frac {\sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {\sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d} \\ \end{align*}
Time = 0.12 (sec) , antiderivative size = 111, normalized size of antiderivative = 0.96 \[ \int \cot (c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\frac {-2 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a}}\right )+\sqrt {a-i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a-i b}}\right )+\sqrt {a+i b} \text {arctanh}\left (\frac {\sqrt {a+b \tan (c+d x)}}{\sqrt {a+i b}}\right )}{d} \]
[In]
[Out]
Timed out.
hanged
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 299 vs. \(2 (90) = 180\).
Time = 0.27 (sec) , antiderivative size = 614, normalized size of antiderivative = 5.29 \[ \int \cot (c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\left [\frac {d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) - d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (-d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) + d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) - d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (-d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) + 2 \, \sqrt {a} \log \left (\frac {b \tan \left (d x + c\right ) - 2 \, \sqrt {b \tan \left (d x + c\right ) + a} \sqrt {a} + 2 \, a}{\tan \left (d x + c\right )}\right )}{2 \, d}, \frac {d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) - d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} \log \left (-d \sqrt {\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} + a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) + d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) - d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} \log \left (-d \sqrt {-\frac {d^{2} \sqrt {-\frac {b^{2}}{d^{4}}} - a}{d^{2}}} + \sqrt {b \tan \left (d x + c\right ) + a}\right ) + 4 \, \sqrt {-a} \arctan \left (\frac {\sqrt {b \tan \left (d x + c\right ) + a} \sqrt {-a}}{a}\right )}{2 \, d}\right ] \]
[In]
[Out]
\[ \int \cot (c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\int \sqrt {a + b \tan {\left (c + d x \right )}} \cot {\left (c + d x \right )}\, dx \]
[In]
[Out]
\[ \int \cot (c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\int { \sqrt {b \tan \left (d x + c\right ) + a} \cot \left (d x + c\right ) \,d x } \]
[In]
[Out]
Exception generated. \[ \int \cot (c+d x) \sqrt {a+b \tan (c+d x)} \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Time = 4.81 (sec) , antiderivative size = 682, normalized size of antiderivative = 5.88 \[ \int \cot (c+d x) \sqrt {a+b \tan (c+d x)} \, dx=-\frac {2\,\sqrt {a}\,\mathrm {atanh}\left (\frac {64\,\sqrt {a}\,b^{12}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{576\,a^5\,b^8+640\,a^3\,b^{10}+64\,a\,b^{12}}+\frac {640\,a^{5/2}\,b^{10}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{576\,a^5\,b^8+640\,a^3\,b^{10}+64\,a\,b^{12}}+\frac {576\,a^{9/2}\,b^8\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{576\,a^5\,b^8+640\,a^3\,b^{10}+64\,a\,b^{12}}\right )}{d}-\mathrm {atan}\left (-\frac {32\,a\,b^{11}\,\sqrt {\frac {a}{4\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {16\,a\,b^{12}}{d}-\frac {a^2\,b^{11}\,48{}\mathrm {i}}{d}+\frac {16\,a^3\,b^{10}}{d}-\frac {a^4\,b^9\,48{}\mathrm {i}}{d}}+\frac {a^2\,b^{10}\,\sqrt {\frac {a}{4\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,128{}\mathrm {i}}{\frac {16\,a\,b^{12}}{d}-\frac {a^2\,b^{11}\,48{}\mathrm {i}}{d}+\frac {16\,a^3\,b^{10}}{d}-\frac {a^4\,b^9\,48{}\mathrm {i}}{d}}+\frac {96\,a^3\,b^9\,\sqrt {\frac {a}{4\,d^2}-\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {16\,a\,b^{12}}{d}-\frac {a^2\,b^{11}\,48{}\mathrm {i}}{d}+\frac {16\,a^3\,b^{10}}{d}-\frac {a^4\,b^9\,48{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {a-b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i}-\mathrm {atan}\left (\frac {32\,a\,b^{11}\,\sqrt {\frac {a}{4\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {16\,a\,b^{12}}{d}+\frac {a^2\,b^{11}\,48{}\mathrm {i}}{d}+\frac {16\,a^3\,b^{10}}{d}+\frac {a^4\,b^9\,48{}\mathrm {i}}{d}}+\frac {a^2\,b^{10}\,\sqrt {\frac {a}{4\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}\,128{}\mathrm {i}}{\frac {16\,a\,b^{12}}{d}+\frac {a^2\,b^{11}\,48{}\mathrm {i}}{d}+\frac {16\,a^3\,b^{10}}{d}+\frac {a^4\,b^9\,48{}\mathrm {i}}{d}}-\frac {96\,a^3\,b^9\,\sqrt {\frac {a}{4\,d^2}+\frac {b\,1{}\mathrm {i}}{4\,d^2}}\,\sqrt {a+b\,\mathrm {tan}\left (c+d\,x\right )}}{\frac {16\,a\,b^{12}}{d}+\frac {a^2\,b^{11}\,48{}\mathrm {i}}{d}+\frac {16\,a^3\,b^{10}}{d}+\frac {a^4\,b^9\,48{}\mathrm {i}}{d}}\right )\,\sqrt {\frac {a+b\,1{}\mathrm {i}}{4\,d^2}}\,2{}\mathrm {i} \]
[In]
[Out]